/*帮助中心*/
import request from '@/utils/request';
//主平台系统配置新增/修改接口
export async function saveShelp(data) {
  const res = await request.post('/business/hostsystemconfig/save', data);
  if (res.data.code === 2000) {
    return res.data;
  }
  return Promise.reject(new Error(res.data.msg));
}
//主平台系统配置查询接口
export async function getHostSysConfigInfo(data) {
  const res = await request.post(
    '/business/hostsystemconfig/getHostSysConfigInfo',
    data
  );
  if (res.data.code === 2000) {
    return res.data;
  }
  return Promise.reject(new Error(res.data.msg));
}

// 添加图片
export async function mainPlatformSaveImg(data) {
  const res = await request.post(
    '/business/hostplatformsaveimg/addSaveImg',
    data
  );
  if (res.data.code === 2000) {
    return res.data;
  }
  return Promise.reject(new Error(res.data.msg));
}
//   删除图片
export async function mainPlatformDeleteImg(data) {
  const res = await request.post(
    '/business/hostplatformsaveimg/deleteSaveImg',
    data
  );
  if (res.data.code === 2000) {
    return res.data;
  }
  return Promise.reject(new Error(res.data.msg));
}
// 图片列表
export async function mainPlatformPageImg(data) {
  const res = await request.post(
    '/business/hostplatformsaveimg/getSaveImgList',
    data
  );
  if (res.data.code === 2000) {
    return res.data;
  }
  return Promise.reject(new Error(res.data.msg));
}
